<h1>Listado de comités de compras </h1>
<div class="paging">
    <?php
    echo $this->Paginator->options(array('update' => '#content', 'evalScripts' => false));
    echo $this->Paginator->prev('< ' . __('Anterior'), array(), null, array('class' => 'prev disabled'));
    echo $this->Paginator->numbers(array('separator' => ''));
    echo $this->Paginator->next(__('Siguiente') . ' >', array(), null, array('class' => 'next disabled'));
    $cont = 1;
    ?>
</div>
<table id="tabla">
    <thead>
        <tr>
            <th>ID</th>
            <th><?php echo $this->Paginator->sort('Fecha del comité', 'Committee.fecha'); ?></th>
            <th></th>
            <th></th>
            <th></th>
        </tr>
    </thead>
    <tbody>
        <?php foreach ($Committees as $Committee): ?>
            <tr>
                <td><?php echo $cont;
        $cont++
            ?></td>
                <td><?php echo $Committee['Committee']['fecha']; ?></td>
                <td><?php echo $this->Ajax->link('Editar', array('controller' => 'Committees', 'action' => 'edit', $Committee["Committee"]["id"]), array('update' => 'content', 'indicator' => 'loading', 'class' => 'actions', 'complete' => 'cargar()')); ?><br></td>
                <td><?php echo $this->Ajax->link('Valores por rubro', array('title' => 'Ingresar los valores por rubro de este comité', 'controller' => 'CommitteeBudgets', 'action' => 'index', $Committee["Committee"]["id"]), array('update' => 'content', 'indicator' => 'loading', 'class' => 'actions')); ?><br></td>
                <td><?php echo $this->Ajax->link('Eliminar', array('controller' => 'Committees', 'action' => 'delete', $Committee["Committee"]["id"], $follow_id), array('update' => 'content', 'indicator' => 'loading', 'class' => 'actions'), '¿Desea eliminar el registro?'); ?><br></td>
            </tr>
<?php endforeach; ?>
    </tbody>
</table>
<?php echo $this->Js->writeBuffer(); ?>
<br>
<table style="width: 400px" border="0"  CellSpacing=10  align="center" >
    <tbody>
        <tr>  
            <td><br><br><?php echo $this->Ajax->link($this->Html->image('regresar.gif', array('width' => '30', 'heigth' => '30', 'alt' => 'Regresar', 'title' => 'Regresar')), array('controller' => 'Follows', 'action' => 'index'), array('update' => 'content', 'indicator' => 'loading', 'escape' => false)); ?><br></td>
            <td><br><br><?php echo $this->Ajax->link('Adicionar comité', array('controller' => 'Committees', 'action' => 'add', $follow_id), array('update' => 'content', 'indicator' => 'loading', 'class' => 'actions', 'complete' => 'cargar()')); ?><br></td>
            <td><br><br><?php if (!empty($Committees)) echo $this->Html->link('Imprimir formato', array('controller' => 'Follows', 'action' => 'print_letter', $follow_id), array('target' => '_blank', 'indicator' => 'loading', 'class' => 'actions')); ?><br></td>
        </tr>
    </tbody>
</table>
<br>